-- CALC_ROB_FAIL_WAIT_TIME
-- 计算掠夺失败等待时间

return function(failTimes, isBoss)
    --  冷却时间
    if not failTimes or failTimes == 0 then
        return 0;
    end

    -- 1m、5m、10m、30m、1h、2h、2h、2h、4h......
    local waitTime = { 60, 300, 600, 1800, 3600, 7200, 7200, 7200, 14400 };

    if isBoss then
        -- 如果是boss
        waitTime = {300, 600, 1800, 3600, 7200, 14400, 28800};
    end

    failTimes = failTimes;
    failTimes = math.min(failTimes, #waitTime);

    local cd = waitTime[failTimes];

    -- 属性降低cd
    local prop = PropM.combine(ME.user, "rob_cooldown", 1);
    cd = PropM.apply(prop, cd);

    return cd;
end
